import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View,
  Button,
  Image,
  TouchableOpacity,
  Modal,
} from 'react-native';

import Util from './../../util/util';
import revertFinish from './revertFinish';


export default class revertRecognition extends Component<{}> {

    static navigationOptions = {
        headerTitle: '开柜完成'
    }
    constructor(props) {
        super(props);
        this.state = {
          show:false,
        };
    }
    render() {
        return (
            <View style={styles.container} >
                <Image style={styles.img} source={require('./../../source/img/warn.jpg')} />
                <Text style={{marginTop:65*Util.size.height/667,fontSize: 20,color:'#333'}} >归还柜门已开！</Text>
                <Text style={{marginTop:24*Util.size.height/667,fontSize:16,color:'#666',width: Util.size.width*0.7}}>请将需要归还的单件玩具放入柜格中，等待识别，识别成功后将自动回收玩具</Text>
                <TouchableOpacity style={styles.navBtnStyle} onPress={this._recognition.bind(this)} >
                    <Text style={{margin:15,color:'#fff'}} >开始识别</Text>
                </TouchableOpacity>
            </View>

        )
    }
    _recognition() {
      // alert('开始识别')
      this.props.navigation.navigate('revertFinish')
    }

}
const styles = StyleSheet.create({
    container: {
        flex: 1,
        alignItems: 'center'
    },
    navBtnStyle: {
        backgroundColor: 'red',
        borderRadius: 20,
        marginTop: 79*Util.size.height/667,
        alignItems: 'center',
        marginLeft: Util.size.width * 0.005,
        width: Util.size.width * 0.9,
    },
    img: {
        marginTop:60*Util.size.height/667,
        width: Util.size.width*115/375,
        height: Util.size.width*115/375,
    },
    // modal的样式
    modalStyle: {
        // backgroundColor:'#ccc',
        alignItems: 'center',
        justifyContent:'center',
        // marginBottom:0,
        marginTop: 500*Util.size.height/812,
        flex:1,
    },

})
